<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="images/css.css" rel="stylesheet" type="text/css" />	
</head>
<body>
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableline">
   <html:form action="enroll.do?method=selectEnroll" method="post">
    <tr>
      <td height="40" colspan="6" align="center" bgcolor="#ffffff" class="STYLE4">报名考生数据管理</td>
    </tr>
    <tr>
      <td height="26" colspan="6" align="center" bgcolor="#ffffff">身份证号：<html:text property="idCard" />&nbsp;&nbsp;网报号：<html:text property="serialNumber" />
        &nbsp;<html:submit value="查找考生"/>${error }</td>
    </tr>
    </html:form>
    <tr>
      <td height="26" colspan="6" align="center" bgcolor="#ffffff">
      <a href="enrollByPaid.do">未交费</a> &nbsp; &nbsp;  <a href="enrollByIcon.do">未上传相片</a> &nbsp; &nbsp;</td>
    </tr>
    <tr>
      <td width="30%" height="26" align="center" bgcolor="#ffffff">姓名</td>
      <td width="30%" align="center" bgcolor="#ffffff">身份证号</td>
      <td width="15%" align="center" bgcolor="#ffffff">交费情况</td>
      <td width="15%" align="center" bgcolor="#ffffff">相片情况</td>
      <td align="center" bgcolor="#ffffff">操作</td>
    </tr>
    <c:if test="${!empty pm.datas}">
		<c:forEach items="${pm.datas  }" var="enroll">
    <tr>
       <tr>
      <td height="26" align="center" bgcolor="#ffffff"><a href="enroll.do?method=findEnrollById&id=${enroll.id }">${enroll.name }</a></td>
      <td height="26" align="center" bgcolor="#ffffff">${enroll.examinee.idCard }</td>
      <td height="26" align="center" bgcolor="#ffffff">
      <c:if test="${enroll.isPaid ==0 }"><font color="red">未交费</font></c:if>
      <c:if test="${enroll.isPaid ==1 }">已交费</c:if>
      </td>
      <td height="26" align="center" bgcolor="#ffffff">
      <c:if test="${empty enroll.icon }"><font color="red" >无相片</font></c:if>
      <c:if test="${!empty enroll.icon }">有相片</c:if>
      </td>
      <td height="26" align="center" bgcolor="#ffffff">
      <c:if test="${enroll.isPaid ==0 }"><a href="enroll.do?method=updateEnrollPaid&id=${enroll.id }">交费</a></c:if>
      &nbsp;&nbsp;<a href="enroll.do?method=delete&id=${enroll.id }">删除</a></td>
    </tr>
    </c:forEach>
    </c:if>
  </table>
<c:if test="${pm.total != -1}">   
<pg:pager url="enrollByIcon.do" items="${pm.total }" export="currentPageNumber=pageNumber">
<pg:first>
		<a href="${pageUrl }">首页</a>

	</pg:first>
	<pg:prev>
		<a href="${pageUrl }">上一页</a>
	</pg:prev>
	<pg:pages>
		<c:choose>
			<c:when test="${currentPageNumber eq pageNumber}">
				<font color="red">${pageNumber }</font>
			</c:when>
			<c:otherwise>
				<a href="${pageUrl }">${pageNumber }</a>
			</c:otherwise>
		</c:choose>
	</pg:pages>
	<pg:next>
		<a href="${pageUrl }">下一页</a>
	</pg:next>
	<pg:last>
		<a href="${pageUrl }">尾页</a>
	</pg:last>
</pg:pager>
</c:if>
</body>
</html>